import os
import json

from wechat import sender


_FILE_PATH = os.path.abspath(__file__)
_DIR_PATH = os.path.abspath(os.path.dirname(_FILE_PATH) + os.path.sep + ".")
_CONFIG_FILE = os.path.join(_DIR_PATH, 'config.json')
with open(_CONFIG_FILE, encoding='UTF-8') as f:
    _CONFIG = json.load(f)


if __name__ == '__main__':
    wechat = _CONFIG["wechat"]
    user_list = _CONFIG["user_list"]

    if wechat:
        sender.file_upload(user_list)

    print("操作完成")
